<template>
	<view class="detail">
		<text>{{options.title}}</text>
		<view class="text_box">
			<text>{{'主讲：'+options.organizer+'|'+options.speaker}}</text>
			<text>开始时间：{{options.startTime}}</text>
			<text>结束时间：{{options.endTime}}</text>
			<text>直播地址：{{options.liveUrl}}</text>
			<view :style="`background:${options.status==0?'#423DD4':options.status==1?'#628FCB':'#a5a5b0'}`">
				<text>{{options.status==0?'未开始':options.status==1?'进行中':'已结束'}}</text>
			</view>
		</view>
		<view class="content_box">
			<text v-html="options.liveDesc"></text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				options: {}
			}
		},
		onLoad(option) {
			this.options = JSON.parse(decodeURIComponent(option.item))
		},
		methods: {
			handleClick() {
				uni.makePhoneCall({
					phoneNumber: '10086',
				})
			},
		},
	}
</script>

<style lang="less" scoped>
	.detail {
		width: 100%;
		padding: 28upx;

		>text {
			display: block;
			font-size: 34upx;
			color: #333333;
			font-weight: 600;
			margin-bottom: 28upx;
		}

		.text_box {
			width: 100%;
			font-size: 24upx;
			color: #666;
			margin-bottom: 28upx;
			line-height: 50upx;
			position: relative;

			>text {
				display: block;
			}

			>view {
				width: 85upx;
				height: 85upx;
				border-radius: 18upx;
				display: flex;
				justify-content: center;
				align-items: center;
				position: absolute;
				top: 5%;
				right: 0;

				>text {
					font-size: 20upx;
					color: #ffffff;
				}
			}
		}

		.content_box {
			width: 100%;
			text-align: justify;
			padding: 28upx;
			margin-bottom: 28upx;
			background: #fff;
			border-radius: 18upx;

			>text {
				color: #333333;
				font-size: 28upx;
			}
		}
	}
</style>